package com.hskn.hss.module.attendkqjg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.hskn.hss.utils.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AttendKqjg implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 考勤结果id
     */
    @TableId(value = "attend_kqjg_id", type = IdType.ASSIGN_UUID)
    private String attendKqjgId;

    /**
     * 上班打卡时间
     */
    private LocalTime sbdksj;

    /**
     * 下班打卡时间
     */
    private LocalTime xbdksj;

    /**
     * 上班打卡结果
     */
    private String sbdkjg;

    /**
     * 下班打卡结果
     */
    private String xbdkjg;

    /**
     * 创建时间
     */
    private Date createTime;

    private String createUid;

    private Date updateTime;

    private String updateUid;

    /**
     * 出勤明细id
     */
    private String attendId;

    /**
     * 人员id
     */
    private String personId;

    /**
     * 出勤日期
     */
    private LocalDate date;

//    public String getSbdksj() {
//        return StringUtils.localtimeToStr(sbdksj);
//    }
//
//    public String getXbdksj() {
//        return StringUtils.localtimeToStr(xbdksj);
//    }

    public String getDate() {
        return StringUtils.localDateToStr(date);
    }

    /**
     * 当天班组的第几班
     */
    private Integer mindex;
}
